/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "news_point")
//@NamedQueries({@NamedQuery(name = "NewsPoint.findAll", query = "SELECT n FROM NewsPoint n"), @NamedQuery(name = "NewsPoint.findById", query = "SELECT n FROM NewsPoint n WHERE n.id = :id"), @NamedQuery(name = "NewsPoint.findByClientid", query = "SELECT n FROM NewsPoint n WHERE n.clientid = :clientid"), @NamedQuery(name = "NewsPoint.findBySelectnum", query = "SELECT n FROM NewsPoint n WHERE n.selectnum = :selectnum"), @NamedQuery(name = "NewsPoint.findByPointdate", query = "SELECT n FROM NewsPoint n WHERE n.pointdate = :pointdate")})
public class NewsPoint implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "clientid")
    private String clientid;
    @Column(name = "selectnum")
    private Integer selectnum;
    @Column(name = "pointdate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date pointdate;
    @JoinColumns({@JoinColumn(name = "cid", referencedColumnName = "cid"), @JoinColumn(name = "channleid", referencedColumnName = "channleid")})
    @ManyToOne
    private NewsExtendsChannelTitle newsExtendsChannelTitle;

    public NewsPoint() {
    }

    public NewsPoint(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getClientid() {
        return clientid;
    }

    public void setClientid(String clientid) {
        this.clientid = clientid;
    }

    public Integer getSelectnum() {
        return selectnum;
    }

    public void setSelectnum(Integer selectnum) {
        this.selectnum = selectnum;
    }

    public Date getPointdate() {
        return pointdate;
    }

    public void setPointdate(Date pointdate) {
        this.pointdate = pointdate;
    }

    public NewsExtendsChannelTitle getNewsExtendsChannelTitle() {
        return newsExtendsChannelTitle;
    }

    public void setNewsExtendsChannelTitle(NewsExtendsChannelTitle newsExtendsChannelTitle) {
        this.newsExtendsChannelTitle = newsExtendsChannelTitle;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsPoint)) {
            return false;
        }
        NewsPoint other = (NewsPoint) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsPoint[id=" + id + "]";
    }

}
